<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        
        <script type="text/javascript">
            alert("klllll")
          /* 第一种创建动态数组 */
         var arr1 = new Array();
         arr1[8] = 3;
         console.log(arr1);
           
        /* 
            第二种创建定长数组
        */
       var arr2 = new Array(6);
       arr2[3] = 4;
       arr2[5] = true;
       console.log(arr2);

       /* 第三种创建时直接指定元素 */
       var arr3 = new Array(1,"dfdfd",true,false);
       console.log(arr3);

       /* 第四种创建方式：相当于第三种简写 */
       var arr4 = [true,false,"tiantian",4,5]
       console.log(arr4);

        </script>
    </head>
    <body>

    </body>
</html>